package com.yuantu.judiciary.model.vo;

import com.yuantu.judiciary.model.dto.EntInvDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

/**
 * 企业对外投资
 *
 * @author syw
 * @since 2023-07-20
 **/
@Data
@ApiModel("企业对外投资")
@Builder
public class EntInvVO {
    @ApiModelProperty("企业机构名称") private String entjgname;
    @ApiModelProperty("注册号") private String regno;
    @ApiModelProperty("企业（机构）类型") private String enttype;
    @ApiModelProperty("注册资本（企业:万元）") private String regcap;
    @ApiModelProperty("注册资本币种") private String regcapcur;
    @ApiModelProperty("企业状态") private String entstatus;
    @ApiModelProperty("登记机关") private String regorg;
    @ApiModelProperty("投资数额（万）") private String subconam;
    @ApiModelProperty("投资单位") private String congrocur;
    @ApiModelProperty("投资比例") private String fundedratio;
    @ApiModelProperty("投资方式") private String conform;
    @ApiModelProperty("开业日期") private String esdate;
    @ApiModelProperty("法定代表人姓名") private String name;
    @ApiModelProperty("企业总数量") private String binvvamount;
    @ApiModelProperty("注销日期") private String candate;
    @ApiModelProperty("吊销日期") private String revdate;
    @ApiModelProperty("注册地址行政区编号") private String regorgcode;
    @ApiModelProperty("统一社会信用代码") private String creditcode;

    public static EntInvVO getEntEntinv(EntInvDTO data) {
        return EntInvVO.builder()
                .entjgname(data.getENTJGNAME())
                .regno(data.getREGNO())
                .enttype(data.getENTTYPE())
                .regcap(data.getREGCAP())
                .regcapcur(data.getREGCAPCUR())
                .entstatus(data.getENTSTATUS())
                .regorg(data.getREGORG())
                .subconam(data.getSUBCONAM())
                .congrocur(data.getCONGROCUR())
                .fundedratio(data.getFUNDEDRATIO())
                .conform(data.getCONFORM())
                .esdate(data.getESDATE())
                .name(data.getNAME())
                .binvvamount(data.getBINVVAMOUNT())
                .candate(data.getCANDATE())
                .revdate(data.getREVDATE())
                .regorgcode(data.getREGORGCODE())
                .creditcode(data.getCREDITCODE())
                .build();
    }

}
